Use the newly-public Earth 2.1 XSD in KML writer.
authorrobertl <robertl>
Thu, 1 Feb 2007 19:46:08 +0000 (19:46 +0000)
committerrobertl <robertl>
Thu, 1 Feb 2007 19:46:08 +0000 (19:46 +0000)
kml.c
reference/earth-expertgps.kml
reference/earth-gc.kml

diff --git a/kml.c b/kml.c
index bd4bc4bbb22c0d46714116d1eeb68c55e109cfcb..ad35998d5903026d64e1497ee40b85fbf41c7321 100644 (file)
--- a/kml.c
+++ b/kml.c
@@ -181,7 +181,7 @@ void wpt_desc(const char *args, const char **unused)
                tmp = xstrdup((char *)args);
                c = lrtrim(tmp);
                if (*c) {
-//                     wpt_tmp->description = xstrappend(wpt_tmp->description, c);
+                       wpt_tmp->description = xstrappend(wpt_tmp->description, c);
                }
                xfree(tmp);
        }
@@ -802,7 +802,11 @@ void kml_write(void)
        trackdata = (!! strcmp("0", opt_trackdata));
 
        kml_write_xml(0,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
-       kml_write_xml(1,"<kml xmlns=\"http://earth.google.com/kml/2.1\">\n");
+       kml_write_xml(1,"<kml xmlns=\"http://earth.google.com/kml/2.1\"\n"
+               "\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+               "\txsi:schemaLocation=\"http://earth.google.com/kml/2.1 \n"
+               "\thttp://code.google.com/apis/kml/schema/kml21.xsd\">\n"
+       );
        kml_write_xml(1,"<Document>\n");
 
        now = current_time();
index 0d6cc5d2ada9803f99ca15d1f08285f476671e36..010570ff769aac8731a86efe98bfd07032f194fb 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<kml xmlns="http://earth.google.com/kml/2.1">
+<kml xmlns="http://earth.google.com/kml/2.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://earth.google.com/kml/2.1 
+       http://code.google.com/apis/kml/schema/kml21.xsd">
   <Document>
     <name>GPS device</name>
 <!-- Normal route style -->
index 556b0b55c9c1abc5ce2278f8fed5e1bae087c8dd..20c2122a8199ef764076dd85647122e9c21d85e9 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<kml xmlns="http://earth.google.com/kml/2.1">
+<kml xmlns="http://earth.google.com/kml/2.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://earth.google.com/kml/2.1 
+       http://code.google.com/apis/kml/schema/kml21.xsd">
   <Document>
     <name>GPS device</name>
 <!-- Normal route style -->